﻿<%@ WebHandler Language="C#" Class="ZSCheckMissionLookBoard" %>

using System;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using System.Web.SessionState;
using ReportBusiness;

public class ZSCheckMissionLookBoard : IHttpHandler
{
    private static ZSCheckMissionLookBoardBusiness pdb = new ZSCheckMissionLookBoardBusiness();
    public bool IsReusable { get { return false; } }
    public void ProcessRequest(HttpContext context)
    {
        Dictionary<string, object> para = new Dictionary<string, object>();
        para["currentPage"] = context.Request.Form["page"].ToString();
        para["pageSize"] = context.Request.Form["rows"].ToString();
        para["factoryid"] = EncryptAndDecryptTool.DesDecrypt(context.Request.Form["factoryid"].ToString());
        int pageCount = 0;
        int rowCount = 0;
        string UnFinishedCount = "";
        DataTable dt = pdb.GetUnFinishedDataMonth(para, out UnFinishedCount, out pageCount, out rowCount);
        var json = JsonConvert.SerializeObject(dt);
        context.Response.ContentType = "text/json";
        json = "{\"data\":" + json.ToString()
                + ",\"count\":" + rowCount
                + ",\"code\":" + "0"
                + ",\"msg\":" + "0"
                + "}";
        context.Response.Write(json.ToString());
        context.Response.End();
    }
}